package com.yuma.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.MongoId;

// 映射到mongodb的user集合
@Document(collection = "user")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class User {
    // 映射到mongo的主键
    @MongoId
    private Long id;
    private String name;
    private Integer age;
    private Boolean sex;
}
